<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');


/**
 CONFIG SENDMAAIL
 */
define('ADMIN_MAIL', 'vietdreamtech@gmail.com');
define('USERNAME_EMAIL','vietdreamtech@gmail.com');
define('PASSWORD_EMAIL','@h4ck3r#');
define('HOST_MAIL','smtp.gmail.com');
define('PORT',465);
define('SMTPSECURE','ssl'); // or 'ssl'
/* End of file constants.php */
/* Location: ./application/config/constants.php */

/**
 Define const value
 */
define('MAX_LENGHT_USERNAME', 30);
define('PERMISSION_DEFAULT', 3);
define('PERMISSION_SELLER', 4);
define('ISACTIVITY', 1);
define('RATE_DEFAULT', 0);
define('RESET_PASSWORD_DEFAULT', 0);
define('SECRET_QUESTION_DEFAULT', 0);
define('SUCCESS_VALUE', 1);
define('FAILVALUE', 0);
define('INVALID', 0);
define('INVALID_USER', 'user');
define('EXISTED', -1);
define('INVALID_USER_VALUE', -2);
define('USER_SESSION', -3);

define('T_GCMMODEL', 'GCMModel');
define('T_USER', 't_user');

/**
 Define String
 */

define('WELCOME', "Welcome to Fast Market App!");
define('NICEDAY', "HAVE A NICE DAY!");
define('CHANGE_PASSWORD', 'Password change success !');
/**
CONSTANT DATA RETURN FROM SERVER
 */
define("DATA", "data");
define("LOG", "log");
define("SUCCESS", "success");
define('FAILURE', 'failure');
define('RESULTS', 'results');
/**
Google Cloud Messaging API Key
 */
define("GOOGLE_API_KEY", "AIzaSyDwczDY6oLioY4cPZvPfAICYEl_ZXohjTA");  // Place your Google API Key

/**
Apple Push Notification Service 
 */
define("APNS_SERVER", "gateway.sandbox.push.apple.com:2195");   
define("APNS_CERTIFICATE", "ck_development.pem");
define("APNS_PASSPHRASE", "123456");


/**
VARIABLE OF GCM
 */
define('T_GCMUSER', 'login');
define('LOGIN_ID' , 'st_LoginId');

define('GCM_REGID', 'st_GcmId');
define('CREATE_AT' ,'st_CreatedDate');
define('GCM_TYPE' , 'st_GcmType');
define('GCM_ACTIVE', 'st_IsActive');
define('MESSAGE','message');
define('MEMBER_LIST' , 'member_list');

/**
VARIABLE OF USERINFO TABLE
*/
define('T_USERS' , 'userinfo');
define('USER_ID' , 'st_UserId');
define('USER_PASSWORD' , 'st_Password');
define('USER_PHONE_NUMBER' , 'st_PhoneNumber');
define('USER_NAME' , 'st_UserName');
define('USER_EMAIL', 'st_Email');
define('USER_AVATAR_PATH', 'st_AvatarPath');
define('USER_ADDRESS', 'st_Address');
define('USER_PERMISSION_ID', 'st_UserPermissionId');
define('USER_CREATE_DATE', 'st_CreatedDate');
define('USER_RATE', 'st_Rate');
define('USER_RESET_PASSWORD', 'st_ResetPassword');
define('USER_SECRET_QUESTION', 'st_SecretQuestion');
define('USER_NEW_PASSWORD', 'st_NewPassword');
define('USER_SECRET_ANSWER', 'st_SecretAnswer');

/**
 VARIABLE OF LOGIN TABLE
 */
define('LOGIN_GCM_ID', 'st_GcmId');
define('LOGIN_CREATE_DATE', 'st_Create_Date');
define('LOGIN_IS_ACTIVITY', 'st_IsActive');
define('LOGIN_USER_ID', 'st_UserId');
define('LOGIN_GCM_TYPE', 'st_GcmType');

/**
  USERPERMISSION TABLE
 */
define('T_USER_PERMISSION', 'userpermission');
define('UP_ID', 'st_UserPermissionId');
define('UP_TYPE', 'st_Type');
define('UP_DESCRIPTION', 'st_Description');
define('UP_CATEGORYMANAGER', 'st_CategoryManager');
define('UP_SELLER', 'Seller');
define('UP_USER', 'User');

/**
TAG TABLE
*/
define('T_TAG', 'tag');
define('TAG_ID', 'st_TagId');
define('TAG_TAGNAME', 'st_TagName');
define('TAG_TAGDESCRIPTION', 'st_TagDescription');
/**
REPORT TABLE
*/
define('T_REPORT', 'report');
define('REPORT_ID', 'st_ReportId');
define('REPORT_OBTYPE', 'stObjectType');
define('REPORT_OB_ID', 'st_ObjectId');
define('REPORT_CREATEDATE', 'st_createdDate');
define('REPORT_USERID', 'st_UserId');

/**
PRODUCT TAG TABLE
*/
define('T_PRODUCT_TAG', 'product_tag');
define('PRO_TAG_ID', 'st_Id');
define('PRO_TAG_TAG_ID', 'st_TagId');
define('PRO_TAG_PRODUCT_ID', 'st_ProductId');
define('PRO_TAG_VALUE', 'st_Value');
define('PRO_TAG_VALUE_TYPE', 'st_ValueType');

/**
PRODUCT TALBE
*/
define('T_PRODUCT', 'product');
define('PRODUCT_ID', 'st_ProductId');
define('PRODUCT_USER_ID', 'st_UserId');
define('PRODUCT_CREATEDDATE', 'st_CreatedDate');
define('PRODUCT_CATEGORY_ID', 'st_CategoryId');
define('PRODUCT_LASTUPDATE', 'st_LastUpdate');
define('PRODUCT_IS_COMPLETE', 'st_IsComplete');
define('PRODUCT_DESCRIPTION', 'st_Description');

/**
OFFER TABLE
*/
define('T_OFFER', 'offer');
define('OFFER_ID', 'st_OfferId');
define('OFFER_PRICE', 'st_OfferPrice');
define('OFFER_USER_ID', 'st_UserId');
define('OFFER_PRODUCT_ID', 'st_ProductId');
define('OFFER_CREATEDATE', 'st_CreatedDate');
define('OFFER_IS_APPLY', 'st_IsApply');
/**
FOLLOW USER TABLE
*/
define('T_FOLLOW_USER','follow_user');
define('FL_USER_ID', 'st_FollowId');
define('FL_USER_FROM_ID', 'st_FromUserId');
define('FL_USER_TO_ID', 'st_ToUserId');
define('FL_USER_FL_DATE', 'st_FollowDate');
define('FL_USER_GET_NOTI', 'st_GetNotification');
/**
FOLLOW PRODUCT TABLE
*/
define('T_FOLLOW_PRODUCT', 'follow_product');
define('FL_PRO_ID', 'st_FolowId');
define('FL_PRO_USER_ID', 'st_UserId');
define('FL_PRO_PRO_ID', 'st_ProductId');
define('FL_PRO_FL_DATE', 'st_FollowDate');
define('FL_PRO_GET_NOTI', 'st_GetNotification');
/**
FEEDBACK TABLE
 */
define('T_FEEDBACK', 'feedback');
define('FBACK_ID', 'st_FeedBackId');
define('FBACK_CONTENT','st_ContentFeedBack');
define('FBACK_RATE', 'st_Rate');
define('FBACK_CREATEDATE', 'st_CreatedDate');
define('FBACK_USER_ID', 'st_UserId');
define('FBACK_PRO_ID', 'st_ProductId');
/**
COMMENT TABLE
 */
define('T_COMMENT_ST', 'comment');
define('COMMENT_ID', 'st_CommentId');
define('COMMENT_CONTENT', 'st_CommentContent');
define('COMMENT_CREATEDATE', 'st_CreatedDate');
define('COMMENT_PRO_ID', 'st_ProductId');
define('COMMENT_USER_ID', 'st_UserId');

/**
VARIABLE OF CHAT LOG TABLE
 */
define('T_CHATS' , 'chatlog');
define('CHAT_ID' , 'st_ChatLogId');
define('CHAT_CONTENT' , 'st_Content');
define('CHAT_CREATE_DATE' , 'st_CreatedDate');
define('CHAT_FROM' , 'st_FromUserId');
define('CHAT_TO' , 'st_ToUserId');
define('CHAT_TYPE' , 'st_Type');

/**
 CATEGORY REQUIRED FIELD TABLE
 */
define('T_CAT_REQUIRED_F', 'categoryrequiredfield');
define('CAT_RE_FIELD_ID', 'st_CategoryRequiredFieldId');
define('CAT_RE_FIELD_CATE_ID', 'st_CategoryId');
define('CAT_RE_FIELD_TAG_ID', 'st_TagId');
/**
CATEGORY TABLE
*/

define('T_CATEGORY', 'category');
define('CATEGORY_ID', 'st_CategoryId');
define('CATEGORY_NAME', 'st_CategoryName');
define('CATEGORY_DESCRIPTION', 'st_Description');
define('CATEGORY_PAR_CATG_ID', 'st_ParentCategoryId');
define('CATEGORY_LEVEL', 'st_CategoryLevel');

/**
UPLOAD 
 */
define('UPLOAD', 'upload');
define('UPLOAD_FOLDER_AVATARS', 'uploads/avatars/');
define('UPLOAD_FOLDER_PRODUCTS', 'uploads/products/');
define('UPLOAD_EXT_DEFAULT', 'jpg');